#if defined USE_SQL
	#if !defined NES_SAVE_SQL_INCLUDED
	#include "include/nes/nes_save_sql.inl"
	#endif
#else
	#if !defined NES_SAVE_VAULT_INCLUDED
	#include "include/nes/nes_save_vault.inl"
	#endif
#endif

#define NES_SAVE_INCLUDED 1

stock saveAll(id) {
	if(!is_player(id))
		return;
	new money = cs_get_user_money(id);
	new frags = get_user_frags(id);
	new weaponsNum;
	new weapons[32];
	new hp;
	new ap;
	new apTp;
	if(is_user_alive(id)){
		get_user_weapons(id, weapons, weaponsNum);
		hp = get_user_health(id);		
		ap = 
		cs_get_user_armor(id, CsArmorType:apTp);		
	}
	#if defined USE_SQL
	saveAllSql(id, money,frags,hp,ap,apTp,weapons,weaponsNum);
	
	#else
	saveAllVault(id, money,frags,hp,ap,apTp,weapons,weaponsNum);	
	client_print(id, print_chat, "%L", LANG_PLAYER, "DATA_SAVED");
	#endif
	
}

stock loadAll(id){
	#if defined USE_SQL
	loadAllSql(id);
	#else
	loadAllVault(id);	
	#endif
}

